package br.com.provas;
// Generated 20/10/2014 17:01:06 by Hibernate Tools 4.3.1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbProvas generated by hbm2java
 */
@Entity
@Table(name="tb_provas"
    ,catalog="bd_provas"
)
public class TbProvas  implements java.io.Serializable {


     private Integer idProvas;
     private TbCategoria tbCategoria;
     private TbQuestoes tbQuestoes;
     private String descricaoProva;
     private Set tbDisciplinas = new HashSet(0);

    public TbProvas() {
    }

    public TbProvas(TbCategoria tbCategoria, TbQuestoes tbQuestoes, String descricaoProva, Set tbDisciplinas) {
       this.tbCategoria = tbCategoria;
       this.tbQuestoes = tbQuestoes;
       this.descricaoProva = descricaoProva;
       this.tbDisciplinas = tbDisciplinas;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idProvas", unique=true, nullable=false)
    public Integer getIdProvas() {
        return this.idProvas;
    }
    
    public void setIdProvas(Integer idProvas) {
        this.idProvas = idProvas;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idCategoria")
    public TbCategoria getTbCategoria() {
        return this.tbCategoria;
    }
    
    public void setTbCategoria(TbCategoria tbCategoria) {
        this.tbCategoria = tbCategoria;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idQuestoes")
    public TbQuestoes getTbQuestoes() {
        return this.tbQuestoes;
    }
    
    public void setTbQuestoes(TbQuestoes tbQuestoes) {
        this.tbQuestoes = tbQuestoes;
    }

    
    @Column(name="descricaoProva")
    public String getDescricaoProva() {
        return this.descricaoProva;
    }
    
    public void setDescricaoProva(String descricaoProva) {
        this.descricaoProva = descricaoProva;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="tbProvas")
    public Set getTbDisciplinas() {
        return this.tbDisciplinas;
    }
    
    public void setTbDisciplinas(Set tbDisciplinas) {
        this.tbDisciplinas = tbDisciplinas;
    }




}


